package com.cci.kangdao.controller;

import com.cci.kangdao.dto.BaseResponse;
import com.cci.kangdao.service.RegularLocationService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;


/**
 * @description:
 * @author: joe
 * @company: CTY
 * @since: 2024/1/3 14:56
 * @version: V1.0
 **/

@RestController
@RequestMapping("regularLocation")
public class RegularLocationController {
    @Autowired
    private RegularLocationService regularLocationService;

    @RequestMapping("/getRegularLocationList.aspx")
    @ResponseBody
    public BaseResponse getRegularLocationList(String esn) {
        if (StringUtils.isBlank(esn)) {
            return BaseResponse.error("请输入ESN");
        }
        return regularLocationService.getRegularLocationList(esn);
    }
}
